import { defineStore } from 'pinia'
import defaultSettings from '@/settings'

const { theme, componentsTheme, pageSizeOptions, showTotal } = defaultSettings

export const useSettingsStore = defineStore('settings', {
  state: () => ({
    theme,
    componentsTheme,
    pageSizeOptions,
    showTotal
  }),
  getters: {},
  actions: {
    getSystemIdentify() {
      let identify = ''
      if (window.identify === 'DELTA') {
        identify = 'delta7'
      } else if (window.identify === 'INTEWELL') {
        identify = 'intewell'
      } else if (window.identify === 'NULL') {
        identify = ''
      }
      return identify
    }
  }
})
